﻿using System;
using System.Data;
using KPIS.GERP.GFMS.MODEL;
using System.Collections.Generic;

namespace KPIS.GERP.GFMS.IDAL
{
    public interface IDAL_FIM_Payments
    {
        IList<M_FIM_Payments> GetFull(Nullable<int> bgm_source_seq
            , Nullable<int> bgm_year, Nullable<int> work_area_seq, Nullable<int> event_seq, string direct_pay);
        IList<M_FIM_Payments> GetList(Nullable<int> bgm_source_seq
            , Nullable<int> bgm_year, Nullable<int> work_area_seq, Nullable<int> event_seq);
        M_FIM_Payments GetInfo(int seq);
        M_FIM_Payments GetInfoFromMoneyReqSeq(int money_req_seq);
        IList<M_FIM_Payments> GetListFromPetition(int petition_seq);
        IList<M_FIM_Payments> GetNotPayTax(int? TaxPaySeq, string strBgmSourceSeq, string strBgmYear, string strContactType);
        double GetVatBuySale(int month, int year, int? bgm_source_seq, int? pay_seq);
        DataTable GetVatBuy(int month, int year, int? bgm_source_seq, int? pay_seq);
        DataTable GetVatSale(int month, int year, int? bgm_source_seq, int? pay_seq);
        double GetPrevVatBuySale(int month, int year);

        List<M_FIM_Vat> GetVatFull(string bgm_source_seq, string bgm_year);
        M_FIM_Vat GetVatInfo(string vat_seq);
        M_FIM_Vat GetVatInfoFromPaySeq(string pay_seq);

        List<M_FIM_Payments> GetIncludeVatPayment(int month, int year, int? bgm_source_seq, int? vat_seq);
        List<M_FIM_MoneyReturnDtls> GetIncludeVatReturnDtls(int month, int year, int? bgm_source_seq, int? vat_seq);
        List<M_FIM_Receives> GetIncludeVatReceive(int month, int year, int? bgm_source_seq, int? vat_seq);
        string InsertVat(M_FIM_Vat info);
        void UpdateVat(M_FIM_Vat info);
        void DeleteVat(string vat_seq, int emp_seq);

        string InsertVatDtls(M_FIM_Vat_Dtls info);
        void UpdateVatDtls(M_FIM_Vat_Dtls info);
        void DeleteVatDtls(string vat_seq);

        string Insert(M_FIM_Payments info);
        void Update(M_FIM_Payments info);
        void Delete(M_FIM_Payments info);
        void ChangeStatus(M_FIM_Payments info);
        bool UpdatePayinpack(IList<M_FIM_Payments> lst);
        void UpdateReceipt(M_FIM_Payments info);
        void UpdateTaxPaySeq(int pay_seq, int? tax_pay_seq, int update_by);

        DataTable Report_SumUpPayment(Nullable<DateTime> date);
        DataTable Report_SumUpPaymentFT(Nullable<DateTime> dateFrom, Nullable<DateTime> dateTo, string bgm_source_seq);
        IList<M_BGM_MAS_Source> GetBgmSource();
        /// <summary>
        /// /////////////////////
        /// </summary>
        /// <param name="bgm_source_seq"></param>
        /// <param name="work_area_seq"></param>
        /// <param name="bgm_year"></param>
        /// <param name="pay_seq"></param>
        /// <returns></returns>
        IList<M_FIM_Payments> GetNotRealPayment(Nullable<int> bgm_source_seq, Nullable<int> work_area_seq
            , Nullable<int> bgm_year, Nullable<int> method_seq);
        IList<M_FIM_Payments> GetRealPaid(string pip_ref_no);
        IList<M_FIM_Payments> GetAllRealPayment(int? bgm_source_seq, int? work_area_seq, int? bgm_year, int? method_seq);

        M_FIM_PaymentRecordPrints GetNextDocNoPND(string doc_type);
        M_FIM_PaymentRecordPrints GetPNDPrintInfo(int ref_id, string doc_type);
        string InsertPNDPrint(M_FIM_PaymentRecordPrints model);

        IList<M_FIM_Payments> GetReportPND(string strPaySeq);
    }
}
